import BasePanel from "../../framework/BasePanel";
import Screenshot from "../../framework/Screenshot";
import UIManager from "../../framework/uiMoudle/UIManager";
@ccclass
@inspector
class homeScene extends BasePanel<homeScene> {

    @property(cc.Node)
    label: cc.Node = null;

    onLoad() {
        this.label.on('click', () => {
            let url = Screenshot.screenShot();
            url.then((sprite) => {
                console.log(sprite);
                UIManager.createNode('home', 'initPrefab', { setData: { $_img_sp: sprite } });
            });
        });
    }

    start() {

    }

    onDestroy() {

    }
    setData(data) {
        super.setData(data);
    }

    onShow() {
        super.onShow();
    }

    onHide() {
        super.onHide();
    }

    // update (dt) {}
}

